package com.ibeeking.found.common.config.login;

import com.ibeeking.found.common.config.feign.TenantUserClient;
import com.ibeeking.found.common.resolver.ApiLoginResolver;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;
import java.util.List;

/**
 * 商铺端登录
 *
 * @Author ibeeking
 * @date 2020/8/25
 */
public class ApiLoginResolverConfig implements WebMvcConfigurer {

    @Lazy
    @Resource
    private TenantUserClient upmsBLoginClient;

    /**
     * Token参数解析
     *
     * @param argumentResolvers 解析类
     */
    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        argumentResolvers.add(new ApiLoginResolver(upmsBLoginClient));
    }
}
